Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(factory): Allow HonoOptions<E> with factory #3786

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

miyaji255
Copy link
Contributor

When using factory, options such as strict: false cannot be specified. This Pull Request allows you to specify options when calling createFactory and createApp.

const factory = createFactory({ defaultOptions: { strict: false } });
const app = factory.createApp({ options: { strict: true } }); // Override defaultOptions

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.71%. Comparing base (1e62912) to head (24337a9).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3786      +/-   ##
==========================================
- Coverage   91.71%   91.71%   -0.01%     
==========================================
  Files         160      160              
  Lines       10181    10198      +17     
  Branches     2896     2935      +39     
==========================================
+ Hits         9338     9353      +15     
- Misses        842      844       +2     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yusukebe
Copy link
Member

yusukebe commented Jan 1, 2025

Hi @miyaji255

Thank you for the PR. I think this is a good feature. I've left the comment.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

Hi @miyaji255

Sorry for the delayed review. Looks good! I wonder if we should include this in a patch release or minor release, but I'll decide on and merge it later. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants